package com.jzb.binmvvmsdk.http.work;

import androidx.lifecycle.MutableLiveData;

import com.jzb.binmvvmlib.base.BaseApiService;
import com.jzb.binmvvmlib.base.BaseRepositoryImpl;
import com.jzb.binmvvmlib.http.interceptor.JsonRequestBody;
import com.jzb.binmvvmlib.model.Resource;
import com.jzb.binmvvmsdk.http.util.ApiService;
import com.jzb.binmvvmsdk.http.util.RetrofitEngine;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Observable;

import okhttp3.RequestBody;

/**
 * author jzb
 * Date: 2021/4/9
 * Describe: 所有请求的集合
 */
public class ImpRespostory extends BaseRepositoryImpl{
    private ApiService getApiService(){
        return RetrofitEngine.getRetrofitManager().getApiService();
    }

    public MutableLiveData<Resource<List<String>>> topNew(RequestBody requestBody){
        MutableLiveData<List<String>> liveData=new MutableLiveData<>();
        return observeGo(getApiService().cs(requestBody),liveData);
    }

}
